<template>
  <div>
    <p class="hot_title">人气推荐</p>
    <div class="con">
      <div
        class="con-item"
        v-for="obj in hotGoodsList"
        :key="obj.id"
        @click="
          $router.push({
            path: '/desc',
            query: {
              id: obj.id,
            },
          })
        "
      >
        <div class="left">
          <img :src="obj.list_pic_url" alt="" />
        </div>
        <div class="right">
          <p class="title">{{ obj.name }}</p>
          <p class="desc">{{ obj.goods_brief }}</p>
          <span>${{ obj.retail_price }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "hotGoodsList",
  props: {
    hotGoodsList: {
      type: Array,
    },
  },
};
</script>

<style scoped lang="scss">
.con {
  .con-item {
    display: flex;
    .left {
      flex: 4;
      img {
        width: 100%;
      }
    }
    .right {
      flex: 6;
      font-size: 32px;
      color: #666;
      box-sizing: border-box;
      padding: 20px;
      line-height: 60px;
      span {
        color: #c00000;
      }
    }
  }
}
.hot_title {
  text-align: center;
  font-size: 40px;
  color: #666;
  padding: 20px 0;
  padding-top: 30px;
}
</style>
